<?
global $db;
inc_inclib("query.php");
$groupsopts=query2map($db->query("select id,title from groups order by orders"),"id","title");
#$projects=query2map($db->query("select id,title from project order by title"),"id","title");


$f = array(
	"title"=>array(
		"title"=>"Full Name",
		"type"=>"default",
		"required"=>1,
		),

	"name"=>array(
		"title"=>"Login Name",
		"type"=>"default",
		"required"=>1,
		
		"_validate"=>array(
			"type"=>"dupe",
			"special"=>1,
			),
		
		"regex"=>"^[a-z][a-z0-9]+$",
		"regex_error"=>"Your user name must be at least two characters long, start with a letter and be followed by only letters and numbers.  Lowercase letters only.  No spaces.",
		"onchange"=>'this.value=this.value.toLowerCase();',
			
		),
	"passwd"=>array(
		"title"=>"Password",
		"type"=>"password",
		"special"=>1,
		
		
		"regex"=>"......",
		"regex_error"=>"Your password must be at least 6 characters long.",
		),
		
		
	"email"=>array(
		"title"=>"E-mail",
		"type"=>"default",
		"required"=>1,
		
		"regex"=>".+@.+\..+",
		"regex_error"=>"You must enter a valid e-mail address",
		),
	);
return array(
	"fields"=>$f,
	"table"=>"users",
	"field"=>"title",
	"title"=>"User",
	"titles"=>"Users",
	);
?>
